<template>
  <div>
    <!-- <router-view></router-view> -->
    <!-- <button @click="goa" class="toux"></button> -->
    <!-- MyIndex1.vue -->
    <!-- <router-link tag="span" to="/home/my/a"> asd</router-link> -->
    <!-- <router-view></router-view> -->

    <div class="userMsg">
      <img src="../../assets/logo.png" alt="" @click="goa" />
      <div>
        <div class="userName">{{ userName }}</div>
        <div class="identity">{{ identity }}</div>
      </div>
      <button @click='goSign'>签到</button>
      <!-- <A /> -->
    </div>
    <div class="gongn">
      <span>关注</span>
      <span>粉丝</span>
      <span>获赞</span>
      <span>燃豆</span>
    </div>
  </div>
</template>

<script>
import A from "./A.vue";
import { mapState, mapMutations } from "vuex";
import axios from "axios";

export default {
  data() {
    return {
      userName: "账号",
      identity: "身份",
      Token:
        '"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb2RlIjoiWTVZN1lIIiwiZXhwIjoxNjU4ODkyNzEwLCJpYXQiOjE2NTg4OTI1MzB9.fyLgzVErib9uABEOgbQafDTfeFrC_4v8YOv6vJku24s"',
    };
  },
  mounted() {
    // 请求收藏信息的接口
    // let getAuthCodeAPI = "http://121.89.240.237:8085/api/auth/code";
    // axios.post(getAuthCodeAPI).then((res) => {
    //   // this.collectList = res;
    //   console.log(res);
    // });
    // 请求收藏信息的接口
    // let getCollectAPI = "http://121.89.240.237:8085/api/sys/byId";
    // axios.get(getCollectAPI, { params: { token: this.Token } }).then((res) => {
    //   console.log(res);
    // });
  },
  //   components: {
  //     A,
  //   },
  //   computed: {
  //     ...mapState("zyh", ["flagA"]),
  //   },
  methods: {
    // ...mapMutations("zyh", ["SHOW"]),
    // show() {
    //   this.SHOW({ flag:true});
    //   // this.state.commit.
    // },
    goa() {
      //   console.log(this.$router);
      //   console.log(this.$route);
      this.$router.push("/home/my/a");
    },
    goSign(){
      this.$router.push("/my/sign");

    }
  },
};
</script>

<style lang="scss" scoped>
.userMsg {
  width: 100%;
  height: 172px;
  img {
    margin-left: 32px;
    margin-top: 24px;
    width: 148px;
    height: 148px;
    float: left;
    border-radius: 50%;
  }
  div {
    width: 268px;
    margin-left: 16px;
    float: left;
    .userName {
      width: 268px;
      height: 60px;
      border: 1px solid #888;
      background: #efefef;
      margin-top: 24px;
      font-size: 28px;
      text-align: center;
      line-height: 60px;
    }
    .identity {
      margin-top: 14px;
      width: 122px;
      height: 60px;
      border: 1px solid #888;
      background: #efefef;
      font-size: 28px;
      text-align: center;
      line-height: 60px;
    }
  }
  button {
    width: 160px;
    height: 60px;
    margin-right: 30px;
    margin-top: 24px;
    float: right;
    font-size: 28px;
  }
}
.gongn {
  width: 100%;
  margin-top: 32px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-around;
  span {
    width: 80px;
    height: 60px;
    line-height: 60px;
    font-size: 28px;
    text-align: center;
    border: 1px solid #777;
  }
}
.toux {
  width: 50px;
  height: 50px;
  border-radius: 50px;
  background: red;
}
</style>
